/**
 * @Title: BalanceFetchDao
 * @Package cn.com.yiqi.wsc.dao.balance
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-胥钰淋
 * @date 2017/3/3 11:38
 * @version V1.0
 */
package cn.com.yiqi.wsc.dao.balance;

import cn.com.artemis.framework.base.commons.persistence.CrudDao;
import cn.com.yiqi.wsc.dao.balance.criteria.BalanceCriteria;
import cn.com.yiqi.wsc.dao.balance.entity.BalanceFetchEntity;
import cn.com.yiqi.wsc.dao.balance.entity.BalanceFetchEntityDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author 会员系统组-胥钰淋
 * @ClassName: BalanceFetchDao
 * @Description: TODO
 * @date 2017/3/3 11:38
 */
@Repository
public interface BalanceFetchDao extends CrudDao<BalanceFetchEntity> {

    List<BalanceFetchEntity> selectList(@Param("customerId") Long customerId, @Param("status") Integer status, @Param("startTime") Date startTime, @Param("endTime") Date endTime);


    BigDecimal sumWithDraw(@Param("status") int value, @Param("customerId") Integer userId);


    List<BalanceFetchEntity> selectBalanceFetchDetailList(BalanceCriteria balanceCriteria);

    /**
     * 分页查询
     *
     * @param balanceCriteria
     * @return
     */
    List<BalanceFetchEntityDTO> pageList(BalanceCriteria balanceCriteria);


    /**
     * 获取提现信息
     *
     * @param id
     * @return
     */
    BalanceFetchEntityDTO getFetchInfoByFetchId(@Param("id") Long id);


}
